package com.yazi.mxz.common.db.dao;


import com.yazi.mxz.common.entity.beans.Order;
import com.yazi.mxz.common.entity.custom.Order4Search;
import com.myframework.smhj.hibernate.Searching;
import com.myframework.smhj.hibernate.Page;
import com.myframework.smhj.hibernate.dao.Dao;

public interface OrderDao extends Dao<Order>{
	
	/**
	 * 订单复杂查询
	 * @param order
	 * @param search
	 * @return
	 */
	Page<Order> list(Order4Search order, Searching search);
	
	/**
	 * 根据查询条件获取订单记录数
	 * @param order
	 * @param searchWord
	 * @return
	 */
	int count(Order4Search order, String searchWord);
	
	/**
	 * 下一个要自动确认收货的订单
	 * @return
	 */
	Order oneNextSuccess();

	/**
	 * 下一个要自动确认退货的订单
	 * @return
	 */
	Order oneNextReturned();
}
